Method: Bundler::Molinillo::Resolver::Resolution::UnwindDetails#<=>
- Defined in:
- lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb
#<=>(other) ⇒ Integer
We compare UnwindDetails when choosing which state to unwind to. If two options have the same state_index we prefer the one most removed from a requirement that caused the conflict. Both options would unwind to the same state, but a ‘grandparent` option will filter out fewer of its possibilities after doing so - where a state is both a `parent` and a `grandparent` to requirements that have caused a conflict this is the correct behaviour.
83 84 85 86 87 88 89 90 91 |
# File 'lib/bundler/vendor/molinillo/lib/molinillo/resolution.rb', line 83 def <=>(other) if state_index > other.state_index 1 elsif state_index == other.state_index reversed_requirement_tree_index <=> other.reversed_requirement_tree_index else -1 end end |